[data-component='LoginRwd'] {
  & {
    height: 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    background-image: linear-gradient(90deg, rgba(60, 10, 30, 0.05) 3%, transparent 0),
      linear-gradient(1turn, rgba(60, 10, 30, 0.05) 3%, transparent 0);
    background-size: 20px 20px;
    background-position: calc(50% - 10px) calc(50% - 10px);
    background-repeat: repeat;

    &[data-theme='dark'] {
      background-color: #292a2e;
      background-image: linear-gradient(90deg, rgba(195, 245, 215, 0.05) 3%, transparent 0),
        linear-gradient(1turn, rgba(195, 245, 215, 0.05) 3%, transparent 0);
      background-size: 20px 20px;
      background-position: calc(50% - 10px) calc(50% - 10px);
      background-repeat: repeat;
    }
  }

  .form-structure {
    border-radius: 15px;
    height: 550px;
    width: 450px;
    max-width: 98%;

    // 背景动画
    background: #1890ff;
    background: -webkit-linear-gradient(to bottom, #fffde4, #005aa7);
    background: linear-gradient(to bottom, #fffde4, #005aa7);
    position: relative;
    overflow: hidden;

    .bg-squares {
      list-style: none;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
    }

    .bg-squares li {
      width: 40px;
      height: 40px;
      border-radius: 15px;
      background-color: rgba(255, 255, 255, 0.15);
      position: absolute;
      bottom: -160px;
      animation: square 20s linear infinite;
    }

    .bg-squares li:nth-child(1) {
      left: -1%;
    }

    .bg-squares li:nth-child(2) {
      left: 18%;
      width: 80px;
      height: 80px;
      animation-delay: 2s;
      animation-duration: 17s;
    }

    .bg-squares li:nth-child(3) {
      left: 21%;
      animation-delay: 4s;
    }

    .bg-squares li:nth-child(4) {
      left: 40%;
      width: 60px;
      height: 60px;
      background-color: rgba(255, 255, 255, 0.25);
      animation-duration: 22s;
    }

    .bg-squares li:nth-child(5) {
      left: 65%;
    }

    .bg-squares li:nth-child(6) {
      left: 75%;
      width: 120px;
      height: 120px;
      background-color: rgba(255, 255, 255, 0.2);
      animation-delay: 3s;
    }

    .bg-squares li:nth-child(7) {
      left: 31%;
      width: 160px;
      height: 160px;
      animation-delay: 7s;
    }

    .bg-squares li:nth-child(8) {
      left: 55%;
      width: 20px;
      height: 20px;
      animation-delay: 15s;
      animation-duration: 40s;
    }

    .bg-squares li:nth-child(9) {
      left: 25%;
      width: 10px;
      height: 10px;
      background-color: rgba(255, 255, 255, 0.3);
      animation-delay: 2s;
      animation-duration: 40s;
    }

    .bg-squares li:nth-child(10) {
      left: 90%;
      width: 160px;
      height: 160px;
      animation-delay: 11s;
    }

    @keyframes square {
      0% {
        transform: translateY(0);
      }

      100% {
        transform: translateY(-101vh) rotate(600deg);
      }
    }

    // 边框动画
    animation: glowing-highlight 1.85s linear;
    border: 1px solid #ecddca;
    animation-iteration-count: infinite;

    @keyframes glowing-highlight {
      from {
        -webkit-box-shadow: 0 0 0 rgba(253, 175, 31, 0.3);
        box-shadow: 0 0 0 rgba(253, 175, 31, 0.3);
      }

      50% {
        -webkit-box-shadow: 0 0 11px #f3885a;
        box-shadow: 0 0 11px #f3885a;
      }

      to {
        -webkit-box-shadow: 0 0 0 rgba(253, 175, 31, 0.3);
        box-shadow: 0 0 0 rgba(253, 175, 31, 0.3);
      }
    }
  }

  .form-structure .login-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    z-index: 9;
    transition: all 0.3s ease;
  }

  .form-structure .login-box.slide-hidden {
    top: 0;
    width: 100%;
    transform: translate(-50%, 0%);
    transition: all 0.3s ease;

    #login-btn {
      height: 100px;
      display: flex;
      justify-content: center;
      align-items: center;
      cursor: pointer;
    }
  }

  div.toolbox {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    user-select: none;
    padding: 0;
    color: #333;

    span {
      font-size: 0.88rem;
      text-decoration: none;
      cursor: pointer;
      margin-right: -8px;
    }

    .save-account-btn {
      cursor: pointer;
      display: flex;
      align-items: center;

      input {
        margin: 0;
        padding: 0;
        cursor: pointer;
        width: 0.88rem;
        height: 0.88rem;
      }

      span {
        margin-left: 3px;
        font-size: 0.88rem;
      }
    }
  }

  .submit-btn {
    outline: none;
    letter-spacing: 5px;
    font-weight: 400;
    font-size: 1rem;
    border: 0;
    border-radius: 15px;
    display: block;
    margin: 25px auto;
    height: 40px;
    line-height: 40px;
    text-align: center;
    width: 100%;
    cursor: pointer;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    user-select: none;

    &:hover {
      background-color: rgba(0, 0, 0, 0.8) !important;
    }

    &:active {
      transform: scale(0.95);
      filter: contrast(0.9);
    }
  }

  .form-structure .login-box.slide-hidden .form-holder,
  .form-structure .login-box.slide-hidden .submit-btn {
    opacity: 0;
    visibility: hidden;
  }

  .form-structure .login-box .form-title {
    color: #f8f9fa;
    font-size: 1.85em;
    font-weight: 500;
    letter-spacing: 3px;
    cursor: pointer;
    text-align: center;
  }

  .slide-hidden .form-title {
    transition: all 0.3s ease;
    font-size: 1rem !important;
    color: #6c757d !important;

    &:hover {
      color: #17a2b8 !important;
      text-decoration: underline;
      filter: contrast(0.9);
    }
  }

  .form-holder {
    border-radius: 3px;
    background-color: #fff;
    overflow: hidden;
    margin-top: 25px;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
  }

  .form-structure .login-box .submit-btn {
    background-color: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.7);
  }

  .form-structure .sign-up-box {
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #eeeded;
    z-index: 9;
    transition: all 0.3s ease;

    &.slide-hidden {
      .bg-cubes {
        display: none;
      }
    }

    .bg-cubes {
      position: relative;
      height: 100%;
      width: 100%;
      z-index: 6;

      @keyframes cube {
        from {
          transform: scale(0) rotate(0deg) translate(-50%, -50%);
          opacity: 1;
        }

        to {
          transform: scale(9.8) rotate(960deg) translate(-50%, -50%);
          opacity: 0;
        }
      }

      .cube {
        position: absolute;
        top: 75%;
        left: 65%;
        width: 10px;
        height: 10px;
        border-radius: 3px;
        border: 1px solid #007bff;
        transform-origin: top left;
        transform: scale(0) rotate(0deg) translate(-50%, -50%);
        -webkit-animation: cube 11s ease-in forwards infinite;
        animation: cube 11s ease-in forwards infinite;
      }

      .cube:nth-child(2n) {
        border-color: #1890ff;
      }

      .cube:nth-child(2) {
        -webkit-animation-delay: 0s;
        animation-delay: 0s;
        left: 18%;
        top: 35%;
      }

      .cube:nth-child(3) {
        -webkit-animation-delay: 2s;
        animation-delay: 2s;
        left: 80%;
        top: 50%;
      }

      .cube:nth-child(4) {
        -webkit-animation-delay: 4s;
        animation-delay: 4s;
        left: 90%;
        top: 10%;
      }

      .cube:nth-child(5) {
        -webkit-animation-delay: 6s;
        animation-delay: 6s;
        left: 10%;
        top: 85%;
      }

      .cube:nth-child(6) {
        -webkit-animation-delay: 8s;
        animation-delay: 8s;
        left: 45%;
        top: 10%;
      }
    }
  }

  .form-structure .sign-up-box::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -20px;
    transform: translate(-50%, 0);
    background-color: #eeeded;
    width: 200%;
    height: 250px;
    border-radius: 50%;
    z-index: 6;
    transition: all 0.3s ease;
  }

  .form-structure .sign-up-box .center {
    position: absolute;
    top: calc(50% - 10%);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    z-index: 9;
    transition: all 0.3s ease;
  }

  .form-structure .sign-up-box .center .form-title {
    color: #343a40;
    font-size: 1.85em;
    font-weight: 500;
    text-align: center;
    letter-spacing: 3px;
    cursor: pointer;
  }

  .form-structure .sign-up-box.slide-hidden .form-title {
    margin: 0;
    padding: 0;
  }

  .input-area {
    transition: all 0.3s;
    position: relative;
    cursor: text;

    &:focus-within {
      &::before,
      &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transition: all 0.5s;
        border: 1.35px solid #ffc107;
        animation: clip-path 3s infinite linear;
        border-radius: 3px;
      }

      &::after {
        animation: clip-path 3s infinite -1.5s linear;
      }
    }

    @keyframes clip-path {
      0%,
      100% {
        clip-path: inset(0 0 98% 0);
      }

      25% {
        clip-path: inset(0 98% 0 0);
      }

      50% {
        clip-path: inset(98% 0 0 0);
      }

      75% {
        clip-path: inset(0 0 0 98%);
      }
    }
  }

  .input {
    border: 0;
    outline: none;
    box-shadow: none;
    display: block;
    height: 40px;
    line-height: 40px;
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    width: 100%;
    font-size: 0.88rem;
    color: #343a40;
    font-weight: 400;
    border-radius: 3px;
    box-sizing: border-box;
    caret-color: #28a745;

    &::input-placeholder {
      color: #6c757d;
    }
  }

  .form-structure .sign-up-box .center .submit-btn {
    background-color: #6b92a4;
    color: rgba(255, 255, 255, 0.7);
  }

  .form-structure .sign-up-box.slide-hidden {
    top: 90%;
    transition: all 0.3s ease;
  }

  .form-structure .sign-up-box.slide-hidden .center {
    top: -50%;
    width: 100%;
    transform: translate(-50%, 0%);
    transition: all 0.3s ease;

    #sign-up-btn {
      height: 100px;
      display: flex;
      justify-content: center;
      align-items: center;
      cursor: pointer;
    }
  }

  .form-structure .sign-up-box.slide-hidden .form-holder,
  .form-structure .sign-up-box.slide-hidden .submit-btn {
    opacity: 0;
    visibility: hidden;
  }
}
